package com.xja.cloud.controller;

import com.xja.cloud.entity.Order;
import com.xja.cloud.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("prod")
public class OrderController {
    @Autowired
    private OrderService orderService;

    @GetMapping("list")
    public List<Order> list(){
        System.out.println("查看订单列表");
        return orderService.findOrderList();
    }


}
